package com.tedu.openmedical.hspt.controller;

import com.tedu.openmedical.hspt.pojo.dto.HsptParam;
import com.tedu.openmedical.hspt.pojo.dto.HsptQuery;
import com.tedu.openmedical.hspt.pojo.vo.HsptVO;
import com.tedu.openmedical.hspt.service.HsptService;
import com.tedu.openmedical.base.response.JsonResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/v1/hospitalization/hspt/")
@Api(tags = "住院病案首页管理")
public class HsptController {
    @Autowired
    private HsptService hsptService;
    @GetMapping("select")
    @ApiOperation(value = "查询住院病案功能")
    public JsonResult select(HsptQuery hsptQuery){
        List<HsptVO> list=hsptService.select(hsptQuery);
        return JsonResult.ok(list);
    }
    @PostMapping("insert")
    @ApiOperation(value = "新增病案功能")
    public JsonResult insert(HsptParam hsptParam){
        return JsonResult.ok();
    }
    @PostMapping("delete/{hsptId}")
    @ApiOperation(value = "删除病案功能")
    @ApiImplicitParam(name = "hsptId", value = "住院号", required = true, dataType = "Long")
    public JsonResult delete(Long hsptId){
        return JsonResult.ok();
    }
}
